<?php
if(!empty($obj->data)){ ?>
<form action="/admin/useredit.html" method="POST">
	<table border='0' cellspacing='0' cellpadding='0'>
		<tr>
			<td width="15px" style="padding:10px 0 0 20px;">Імя:</td>
			<td width="700px"><input name='real_name' type="text" style="width:350px;" value="<?=$obj->data['real_name']?>"/></td>
		</tr>
		<tr>
			<td width="15px" style="padding:10px 0 0 20px;">Логін <font color='red' size="3px">*</font>:</td>
			<td width="700px"><input name='username' type="text" style="width:350px;"  value="<?=$obj->data['username']?>"/></td>
		</tr>
                <tr>
                    <td style="padding:2px 0 0 20px;">Змінити пароль</td>
                    <td>
                     <input type="checkbox" name="npass" value="1" <?php if(isset($obj->data['npass']))echo"checked"; ?>/>
                    </td>
                </tr>
		<tr>
			<td width="15px" style="padding:10px 0 0 20px;">Новий пароль:</td>
			<td width="700px"><input name='pass1' type="password" style="width:350px;"  value=""/></td>
		</tr>
		<tr>
			<td width="15px" style="padding:10px 0 0 20px;">Підтвердження паролю:</td>
			<td width="700px"><input name='pass2' type="password" style="width:350px;"  value=""/></td>
		</tr>
		<tr>
			<td width="15px" style="padding:10px 0 0 20px;">E-mail <font color='red' size="3px">*</font>:</td>
			<td width="700px"><input name='email' type="text" style="width:350px;"  value="<?=$obj->data['email']?>"/></td>
		</tr>
		<tr>
			<td width="15px" style="padding:10px 0 0 20px;">Група:</td>
			<td width="700px">
				<select name='role' style="width:352px;">
					<?php foreach($obj->groups as $group){
                                            $select = NULL;
                                            if($group['id']==$obj->data['role']){$select = "selected";}
						echo"<option value='".$group['id']."' ".$select.">".$group['role']."</option>";
					} ?>
				</select>
			</td>
		</tr>
		<tr><td  style="padding:10px 0 0 20px;" colspan="2">
            <input type="hidden" name="id" value="<?=$obj->data['id']?>">
			<input class="button" type="submit" value="Зберегти"/>
			</td>
		</tr>
	</table>
</form>
<?php } ?>
<div style="padding:10px 0 0 20px;color:<?=$obj->status['color']?>;font-size:14px;"><?=$obj->status['content']?></div>

